home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
352_01
/
strppfix.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-22
|
380b
|
16 lines
// STRPPFIX.CPP - contains String::String(int) = fixed length constructor
//
#include <stdlib.h>
#include <string.h>
#include "wtwg.h"
#include "dblib.h"
String::String (int nb)
{
char *ptr = (char *)wmalloc ( nb+1, "String" );
memset ( ptr, ' ', nb );
ptr[nb] = 0;
s = ptr;
n = nb;
}
//--------------- end of String::String(int) ---------------------------